#!/bin/bash

if [ ! -f util/.serverpod_util_root ]; then
    echo "Run this script from the root of the Serverpod repository"
    echo "I.e. util/ensure_no_changes"
    exit 1
fi

if [[ $(git status -s) ]]
then
    echo "Files have been changed while running this test. Diff:"
    git diff

    echo "List of changed files:"
    git status -s
    exit 1
fi
